home *** CD-ROM | disk | FTP | other *** search
/ Super PC 34 / Super PC 34 (Shareware).iso / spc / UTIL / DJGPP2 / V2 / DJLSR200.ZIP / src / libc / posix / fcntl / fcntl.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-02  |  402 b   |  25 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #include <libc/stubs.h>
  3. #include <unistd.h>
  4. #include <fcntl.h>
  5.  
  6. int
  7. fcntl(int fd, int cmd, ...)
  8. {
  9.   switch (cmd)
  10.   {
  11.   case F_DUPFD:
  12.     return dup(fd);
  13.   case F_GETFD:
  14.   case F_SETFD:
  15.   case F_GETFL:
  16.   case F_SETFL:
  17.     return 0;
  18.   case F_GETLK:
  19.   case F_SETLK:
  20.   case F_SETLKW:
  21.     return -1;
  22.   }
  23.   return -1;
  24. }
  25.